// pages/quanxianshezhi/index.js
var util = require('../../utils/util.js');
var db = wx.cloud.database();
const _ = db.command;
var app = getApp();
Page({
  data: {
    time1: '',
    time2: '',
    times: 0,
    name: ''

  },
  onLoad: function () {


    var time1 = this.data.time1
    var en = this.data.time2
    var name = this.data.name
    var times = this.data.times


    var time1 = app.globalData.time1
    var time2 = app.globalData.time2
    var name = app.globalData.category.name;
    var times = app.globalData.times


    this.setData({
      time1: time1,
      time2: time2,
      name: app.globalData.category.name,
      times: times,
    })

  },
  timePickerBindchange: function (e) {

    this.setData({
      timeValue: e.detail.value
    })
    this.pinjie()
  },
  datePickerBindchange: function (e) {
    this.setData({
      dateValue: e.detail.value
    })
    this.pinjie()
  },
  pinjie: function (time, date) {
    var time = this.data.timeValue
    var date = this.data.dateValue
    // var riqi = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate() + ' ' + time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds()
    console.log(time)
    console.log(date)

  }
})